package pl.krakow.ae.knp.wikiboard.gui.tools.markers;

import java.awt.Graphics2D;
import java.awt.event.MouseEvent;
import pl.krakow.ae.knp.wikiboard.gui.board.Board;
import pl.krakow.ae.knp.wikiboard.gui.board.BoardEvent;
import pl.krakow.ae.knp.wikiboard.gui.drawables.Ellipse;

public class EllipseMarker extends FigureMarker
{
   
    public void mousePressed(MouseEvent event, Graphics2D g)
    {
        drawable = new Ellipse(event.getPoint(), Board.getFgColor());
        drawable.draw(g, false);
    }
    
    public void mouseDragged(MouseEvent event, Graphics2D g)
    {
        drawable.draw(g, true);
        drawable.drag(event);
        drawable.draw(g, true);
    }
    
    public void mouseReleased(MouseEvent event, Graphics2D g)
    {
        BoardEvent e = createEvent();
        processBoardEvent(e);
    }

}
